package interpreter;

import java.util.ArrayList;
import java.util.List;

public class MainTest15 {
    public static void main(String[] args) {
        Context context = new Context(10);
        Expression addExpression = new AddExpression();
        Expression subExpression = new SubExpression();
        List<Expression> operations = new ArrayList<Expression>(){{
            add(addExpression);
            add(subExpression);
        }};
        for (Expression operation : operations) {
            operation.interpret(context);
            System.out.println(context);
        }
    }
}
